﻿let path = require('path');
 
let Service = require('node-windows').Service;
 
let svc = new Service({
  name:'File10004', // 服务名称
  description: 'File10004端口开机自启', // 服务描述
  script: path.resolve('./app.js'),// 项目入口文件
  nodeOptions: [
    '--harmony',
    '--max_old_space_size=4096'
  ]
});
 
svc.on('install',function(){
  svc.start();
});
 
svc.install();
